import request from "@/utils/request";
//@ts-ignore
import { ICompanyResData, ICompanyInfo } from "./types";

const baseURL = "/company";

export const getCompanyInfoApi = () =>
  request.get<any, ICompanyResData>(baseURL + "/query");

export const addCompanyApi = (data: ICompanyInfo) =>
  request.post<any, ICompanyResData>(baseURL, data);

export const updateCompanyApi = (id: string, data: ICompanyInfo) =>
  request.put<any, ICompanyResData>(baseURL + "/" + id, data);

export const deleteCompanyApi = (id: string) =>
  request.delete<any, ICompanyResData>(baseURL + "/" + id);
